package com.sina.medical.core.exception;

import com.sina.medical.core.enmu.ResultCode;

/**
 * 这个类是运行时业务异常的基类
 */
public class SinaCustomException extends RuntimeException {

    private ResultCode resultCode = ResultCode.unknown;


    public SinaCustomException(ResultCode resultCode) {
        this.resultCode = resultCode;
    }

    public SinaCustomException(ResultCode resultCode, String message) {
        super(message);
        this.resultCode = resultCode;
    }

    public SinaCustomException(ResultCode resultCode, Throwable cause) {
        super(cause);
        this.resultCode = resultCode;
    }

    public SinaCustomException(ResultCode resultCode, String message, Throwable cause) {
        super(message, cause);
        this.resultCode = resultCode;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }

}
